﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using HRProject.Code.Common;

namespace HRProject.Code.DTO.Salary.Sale
{
    public class BLAgentBasicSalary
    {
        public const string BASE = "BaseSalary";
        public const string MONEY_LIMIT = "MoneyLimit";
        public const string MARKET = "Market";

        private BLAgent agent;
        private BLSalaryInfo salary;
        private BLSalaryInfo superMarket;
        private BLSalaryInfo moneyLimit;
        private int order;
        private DateTime contractDate;
        private int dataSignature;

        public int DataSignature
        {
            get { return dataSignature; }
            set { dataSignature = value; }
        }

        public DateTime ContractDate
        {
            get { return contractDate; }
            set { contractDate = value; }
        }

        public int Order
        {
            get { return order; }
            set { order = value; }
        }

        public BLAgent Agent
        {
            get { return agent; }
            set { agent = value; }
        }

        public BLSalaryInfo SuperMarket
        {
            get { return superMarket; }
            set { superMarket = value; }
        }

        public BLSalaryInfo MoneyLimit
        {
            get { return moneyLimit; }
            set { moneyLimit = value; }
        }

        public BLSalaryInfo Salary
        {
            get { return salary; }
            set { salary = value; }
        }

        public BLAgentBasicSalary()
        {
            this.agent = new BLAgent();
            this.salary = new BLSalaryInfo();
            this.salary.InfoName = BASE;
            this.moneyLimit = new BLSalaryInfo();
            this.moneyLimit.InfoName = MONEY_LIMIT;
            this.superMarket = new BLSalaryInfo();
            this.superMarket.InfoName = MARKET;
        }

        public string SalaryString
        {
            get
            {
                return Util.CustomFormat(salary.InfoNumberValue.ToString(Constant.LongFormat, Constant.enCulture));
            }
        }

        public string MoneyLimitString
        {
            get
            {
                return Util.CustomFormat(moneyLimit.InfoNumberValue.ToString(Constant.LongFormat, Constant.enCulture));
            }
        }
    }
}
